<template>
    <div v-if="data" style="padding: 0px 16px;width: 100%;">
        <!-- 如果有封面的话渲染封面  -->
        <Cover v-if="data.hasCover"></Cover>
        <Table v-for="(item, index) in data.tableCount" :index="index"></Table>
        <Html v-for="(item, index) in data.htmlCount"  :index="index"></Html>
        <WaterMark v-if="data.waterMark" :content="data.waterMark"> </WaterMark>
    </div>
</template>


<script setup>
import Cover from '../components/cover.vue';
import Html from '../components/html.vue';
import WaterMark from '../components/waterMark.vue';
// 此处模拟向后端获取数据
const { data } = await useFetch('/api/data');
//console.log(data)
</script>